import { createRouter, createWebHashHistory } from 'vue-router'
import Layout from '@/components/Layout'

const routes = [
  {
    path: '/',
    name: '首页',
    component: Layout,
    redirect: '/testList',
    children: [
      {
        path: '/enterInformation',
        name: '录入信息',
        component: () => import('@/views/enterInformation.vue')
      },
      {
        path: '/selection',
        name: '分测验选择',
        component: () => import('@/views/selection.vue')
      },
      {
        path: '/doubleText',
        name: '双人关系测验',
        component: () => import('@/views/doubleText.vue') 
      },
      {
        path: '/familyText',
        name: '家庭或团体关系测验',
        component: () => import('@/views/familyText.vue')
      },
      {
        path: '/doubleTextList',
        name: '双人关系测验列表',
        component: () => import('@/views/doubleTextList.vue') 
      },
      {
        path: '/familyTextList',
        name: '家庭或团体关系测验列表',
        component: () => import('@/views/familyTextList.vue')
      },
      {
        path: '/societyTextList',
        name: '社会情境测验列表',
        component: () => import('@/views/societyTextList.vue')
      },
      {
        path: '/testList',
        name: '测试列表',
        component: () => import('@/views/testList.vue')
      },
      {
        path: '/personList',
        name: '个人测试列表',
        component: () => import('@/views/personList.vue')
      },
      {
        path: '/report',
        name: '报告',
        component: () => import('@/views/report.vue')
      },
      {
        path: '/doubleTextListOld',
        name: '双人关系测验列表第一版',
        component: () => import('@/views/firstEdition/doubleTextList.vue') 
      },
      {
        path: '/familyTextListOld',
        name: '家庭或团体关系测验列表第一版',
        component: () => import('@/views/firstEdition/familyTextList.vue')
      },
      {
        path: '/societyTextListOld',
        name: '社会情境测验列表第一版',
        component: () => import('@/views/firstEdition/societyTextList.vue')
      },
      {
        path: '/reportOld',
        name: '报告第一版',
        component: () => import('@/views/firstEdition/report.vue')
      },
      {
        path: '/selectType',
        name: '选择类型',
        component: () => import('@/views/selectType.vue')
      },
      {
        path: '/wholeTest4double',
        name: '综合双人测试',
        component: () => import('@/views/wholeTest4double.vue')
      },
      {
        path: '/wholeTest4Family',
        name: '综合多人测试',
        component: () => import('@/views/wholeTest4Family.vue')
      },
      {
        path: '/wholeTest4Society',
        name: '综合社会测试',
        component: () => import('@/views/wholeTest4Society.vue')
      },
      {
        path: '/selection4adult',
        name: '分测验选择成人',
        component: () => import('@/views/selection4adult.vue')
      },
      {
        path: '/personList4adult',
        name: '个人测试列表成人',
        component: () => import('@/views/personList4adult.vue')
      }
    ]
  },
]

const router = createRouter({
  history: createWebHashHistory(process.env.BASE_URL),
  routes
})

export default router
